﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using Sita.Entities.MetaData.CustomAttributes;

namespace Sita.Entities.MetaData
{
    public class BusinessUnit
    {
        [ScaffoldColumn(false)]
        public object BusinessUnitID { get; set; }

        [ScaffoldColumn(false)]
        public object ParentID { get; set; }

        [Required(ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "NameRequired")]
        [LocalizedDisplayName("Name", ResourceType = typeof(Resources.BusinessUnit))]
        [StringLength(150, ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "NameMaxLength")]
        [DataType(DataType.Text)]
        public object Name { get; set; }

        [ScaffoldColumn(false)]
        public object Deleted { get; set; }

        [LocalizedDisplayName("Address", ResourceType = typeof(Resources.BusinessUnit))]
        [StringLength(200, ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "AddressMaxLength")]
        [DataType(DataType.Text)]
        public object Address { get; set; }

        [LocalizedDisplayName("State", ResourceType = typeof(Resources.BusinessUnit))]
        [StringLength(150, ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "StateMaxLength")]
        [DataType(DataType.Text)]
        public object State { get; set; }


        [LocalizedDisplayName("Neighbourhood", ResourceType = typeof(Resources.BusinessUnit))]
        [StringLength(150, ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "NeighbourhoodMaxLength")]
        [DataType(DataType.Text)]
        public object Neighbourhood { get; set; }

        [LocalizedDisplayName("PostalCode", ResourceType = typeof(Resources.BusinessUnit))]
        [StringLength(50, ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "PostalCodeMaxLength")]
        [DataType(DataType.Text)]
        public object PostalCode { get; set; }

        [LocalizedDisplayName("Email", ResourceType = typeof(Resources.BusinessUnit))]
        [StringLength(150, ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "EmailMaxLength")]
        [DataType(DataType.Text)]
        public object Email { get; set; }

        [LocalizedDisplayName("Phone", ResourceType = typeof(Resources.BusinessUnit))]
        [StringLength(150, ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "PhoneMaxLength")]
        [DataType(DataType.Text)]
        public object Phone { get; set; }

        [LocalizedDisplayName("PoundPrice", ResourceType = typeof(Resources.BusinessUnit))]
        [RegularExpression(@"^([0-9]{0,7})(\.[0-9]{1,2})?$", ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "PoundPriceInvalid")]
        public object PoundPrice { get; set; }

        [LocalizedDisplayName("DollarPrice", ResourceType = typeof(Resources.BusinessUnit))]
        [RegularExpression(@"^([0-9]{0,7})(\.[0-9]{1,2})?$", ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "DollarPriceInvalid")]
        public object DollarPrice { get; set; }

        [LocalizedDisplayName("ImportPrice", ResourceType = typeof(Resources.BusinessUnit))]
        [RegularExpression(@"^([0-9]{0,7})(\.[0-9]{1,2})?$", ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "ImportPriceInvalid")]
        public object ImportPrice { get; set; }

        [LocalizedDisplayName("Web", ResourceType = typeof(Resources.BusinessUnit))]
        [StringLength(100, ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "WebMaxLength")]
        [DataType(DataType.Text)]
        public object Web { get; set; }

        [LocalizedDisplayName("IVAType", ResourceType = typeof(Resources.BusinessUnit))]
        [StringLength(150, ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "IVATypeMaxLength")]
        [DataType(DataType.Text)]
        public object IVAType { get; set; }

        [LocalizedDisplayName("CUIT", ResourceType = typeof(Resources.BusinessUnit))]
        [StringLength(150, ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "CUITMaxLength")]
        [DataType(DataType.Text)]
        public object CUIT { get; set; }

        [LocalizedDisplayName("Incomes", ResourceType = typeof(Resources.BusinessUnit))]
        [StringLength(150, ErrorMessageResourceType = typeof(Resources.BusinessUnit), ErrorMessageResourceName = "IncomesMaxLength")]
        [DataType(DataType.Text)]
        public object Incomes { get; set; }

        [LocalizedDisplayName("InitialDate", ResourceType = typeof(Resources.Vehicle))]
        [DataType(DataType.Date)]
        public object InitialDate { get; set; }
    }
}
